package edu.fight.controller;

import edu.fight.dto.Result;
import edu.fight.dto.ResultStatus;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@RequestMapping("/err")
@Slf4j
public class ErrorController {

    @RequestMapping("/err/{msg}")
    public Result error(@PathVariable String msg){
        log.info("登录错误：{}",msg);
        return Result.to(ResultStatus.error,msg,null,null);
    }
}
